1. Field of the Invention
The invention relates to image correction. Particularly, the invention relates to an image correction device and an image correction method.
2. Description of Related Art
In a general image input/output device, intensity of light received by a lens can be different due to different distances between the light and a lens center, and since a typical image sensing device generally has a shape of rectangle, a problem of peripheral shading of an image is generated. A lens shading correction method is used to correct or compensate the peripheral shading. Generally, such method is to obtain a luminance variation curve of the lens by directly disposing the lens of the image input/output device in front of a parallel-light generating machine, and correct luminance unevenness of the lens center and the periphery thereof according to the luminance variation curve.
Moreover, many image input/output devices have an auto white balance (AWB) function. When a color-shift problem occurs in a captured image due to an environmental setting or different settings of an image input device, the AWB function can correct the color-shift problem of the whole image. After the white balance is performed on the image, a grayscale color of the image can become closer to a gray color.
However, the lens shading correction method is only used to balance luminance of the central and peripheral areas of an image, incapable of resolving the color-shift problem occurring in such areas of the image. Moreover, the local color-shifting problem for some images are caused not only by lens of the image input/output device, but by different combinations of systems or sensing devices. Accordingly, adjusting the lens cannot completely resolve the color-shift problem. Regarding the AWB method, it can only resolve color-shift problem of a whole image, but cannot resolve color-shift problems occurring only at certain areas of the image.
In other words, the conventional correction method cannot adjust distribution of gain compensation, thus unable to resolve the peripheral shading problem at different corners. Moreover, the conventional correction method cannot effectively resolve the local color-shift problem of the image.
In order to overcome the above problems, a quadratic function compensation method has been developed. However, a large number of calculation parameters, difficult to be set and adjusted, are needed to implement such quadratic function compensation method. In addition, accurate calculation is also required, thus greatly increasing calculation complexity. As a result, this method is not easy to be implemented in various platforms, and usually occupies a large memory space.